package top.zy.moredatabase.service.impl;

import lombok.SneakyThrows;
import org.springframework.stereotype.Service;
import top.zy.moredatabase.aop.ChooseDataSource;
import top.zy.moredatabase.data.QueryData;
import top.zy.moredatabase.mapper.TestMapper;
import top.zy.moredatabase.service.TestService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ZackYoung
 * @version 1.0
 * @date 2022/1/6
 */
@Service
public class TestServiceImpl implements TestService {
    @Resource
    TestMapper testMapper;

    @SneakyThrows
    @Override
    @ChooseDataSource
    public List<Object> test1() {
        QueryData queryData = new QueryData();
        queryData.setTableName("db_ent_relations_2.t_auctions_relations_5");
        queryData.setEid("7bd7ba08-6566-4df2-ab07-f98152d11452");
        queryData.setPageSize(10);
        queryData.setPageNo(1);
        return testMapper.getFirmYearReportM(queryData);
    }
}
